package org.qiyu.live.account.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.account.interfaces.IAccountTokenRPC;
import org.qiyu.live.account.provider.service.IAccountTokenService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 作者：無言
 * 时间：2024/11/28 14:58
 * 描述：永无BUG
 */

@DubboService
public class AccountTokenRPCImpl implements IAccountTokenRPC {

    private static final Logger LOGGER = LoggerFactory.getLogger(AccountTokenRPCImpl.class);

    @Resource
    private IAccountTokenService accountTokenService;
    @Override
    public String createAndSaveLoginToken(Long userId) {
        return accountTokenService.createAndSaveLoginToken(userId);
    }

    @Override
    public Long getUserIdByToken(String tokenKey) {
        return accountTokenService.getUserIdByToken(tokenKey);
    }
}
